public class Text {
    public String name;
    public  int age;
    public  String id;
    public int grade;

    public void setDate(String name, int age, String id, int grade) {
        this.age = age;
        this.name=name;
        this.id=id;
        this.grade=grade;
    }

    public void print() {
        System.out.println("姓名:"+this.name+"年龄:"+this.age+"学号:"+this.id+"成绩:"+this.grade);
    }

    public static void main(String[] args) {
        Text stu=new Text();
        stu.setDate("zhang",19,"20202016433",99);
        stu.print();
    }
}
